package com.mnc.web.action.usr;

import javax.annotation.Resource;

import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;

import com.mnc.entity.Article;
import com.mnc.entity.UnitTalk;
import com.mnc.entity.UserPage;
import com.mnc.util.ServiceUtil;
import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionSupport;

@Controller
@Scope("prototype")
public class ForCheckAction extends ActionSupport{

	/**
	 * 
	 */
	private static final long serialVersionUID = 4890851734020928745L;
	private @Resource ServiceUtil serviceUtil;
	private int tempId;

	public int getTempId() {
		return tempId;
	}

	public void setTempId(int tempId) {
		this.tempId = tempId;
	}

	public static long getSerialversionuid() {
		return serialVersionUID;
	}
	
public ServiceUtil getServiceUtil() {
		return serviceUtil;
	}

	public void setServiceUtil(ServiceUtil serviceUtil) {
		this.serviceUtil = serviceUtil;
	}

//		空间详细
		public String detailUserPage() {
			if (tempId>0) {
				UserPage find = this.getServiceUtil().getUserPageService().find(UserPage.class, tempId);
				ActionContext.getContext().put("find", find);
			}
			return "ok";
		}
		//保存待审核空间
		public String saveUserPageForCheck() {
			
			return "ok";
		}
//		文章详细
		public String detailArticle() {
			if (tempId>0) {
				Article find = this.getServiceUtil().getArticleService().find(Article.class, tempId);
				ActionContext.getContext().put("find", find);
			}
			return "ok";
		}
		//保存待审核文章
//		发言详细
		public String detailUnitTalk() {
			if (tempId>0) {
				UnitTalk find = this.getServiceUtil().getUnitTalkService().find(UnitTalk.class, tempId);
				ActionContext.getContext().put("find", find);
			}
			return "ok";
		}
		//保存待审核发言
		
//		举报留言
//		举报评论
//		举报空间
//		举报文章
//		举报发言
	
}
